package com.cssl.client;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.cssl.pojo.Bookinformation;
import com.cssl.pojo.History;
import com.cssl.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.*;

@FeignClient(name = "gateway",path = "books-provider")
public interface UserClient {

    @PostMapping("/uidall")
    public List<User> uidall();

    @PostMapping("userById")
    public User userById(@RequestParam(name = "rid")Integer rid);

    @RequestMapping("/selectUser")
    public User selectUser(@RequestParam(name="uname") String uname);

    @PostMapping("/updUser")
    public boolean updUser(@SpringQueryMap User user);

    @PostMapping("/addHistory")
    public boolean addHistory(@SpringQueryMap History history);

}
